<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="jquery-3.1.0.min.js"></script>
    <style type="text/css">
        div{
            background:red;
            width: 50px;
            height: 50px;
            float: left;
            margin: 2px;
        }
    </style>
</head>
<body>
    <script>
    for(var i=0;i<5;i++){
        $("<div>").appendTo(document.body);
    }
        $("div").click(function(){
            $(this).hide();
    });
    </script>
</body>
</html>